//
//  EditImageViewController.m
//  TipsProject
//
//  Created by Suny on 15/6/8.
//  Copyright (c) 2015年 Suny. All rights reserved.
//

#import "EditImageViewController.h"
#import "UIBarButtonItem+BaseFramework.h"
@interface EditImageViewController ()
@property (nonatomic, strong)UIImageView *imageview;
@end

@implementation EditImageViewController


- (void)viewDidLoad
{
	[super viewDidLoad];
	
	self.navigationItem.leftBarButtonItem = [UIBarButtonItem leftBarButtonItemWithTitle:@"取消"
																				 target:self
																			   selector:@selector(back)];
	
	self.navigationItem.rightBarButtonItem = [UIBarButtonItem leftBarButtonItemWithTitle:@"完成"
																				  target:self
																				selector:@selector(handleFinishText)];

}


- (void)handleFinishText
{
	if (self.finishBlock(self.image))
	{
		[self dismissViewControllerAnimated:YES completion:nil];
	}
}

- (void)back
{
	[self dismissViewControllerAnimated:YES completion:nil];
	
}

- (UIImageView *)imageview
{
	if (!_imageview)
 {
		_imageview = [[UIImageView alloc] init];
	}
	
	return _imageview;
}

@end
